package cn.glfs.domain.strategy.service.armory;

import org.springframework.boot.autoconfigure.web.WebProperties;

/**
 * 随机抽奖接口
 */
public interface IStrategyDispatch {

    Integer getRandomAwardId(Long strategyId);

    Integer getRandomAwardId(Long strategyId, String ruleWeightValue);

    /**
     * key = strategyId + _ + ruleWeightValue；
     * @param key
     * @return
     */
    Integer getRandomAwardId(String key);

    /**
     * 根据策略ID和奖品ID，扣减奖品缓存库存
     * @param strategyId
     * @param awardId
     * @return
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId);
}